var ttt = document.querySelector(".header nav");
var tt = document.querySelector(".header1");


    var p = document.querySelector(".top");
    window.onscroll = function () {
        if(document.documentElement.scrollTop > 1000 || document.body.scrollTop > 1000){
            p.style.display = "block";
        }else{
            p.style.display = "none";
        }
        if(document.documentElement.scrollTop > 400 || document.body.scrollTop > 400){
            ttt.style.display = "none";
            tt.style.display = "block";
        }else{
            ttt.style.display = "block";
            tt.style.display = "none";
        }
    };


p.addEventListener('click',function () {
    window.scrollTo({
        top:0,
        behavior:'smooth'
    })
});
var pp = document.querySelector("#top");
pp.addEventListener('click',function () {
    window.scrollTo({
        top:0,
        behavior:'smooth'
    })
})


var xs_nav = document.querySelector(".xs-nav .box > img");
xs_nav.addEventListener('click',function () {
    window.scrollTo({
        top:0,
        behavior:'smooth'
    })
})


/*
function  Top() {
 window.scrollTo(0,0);
 }*/




/*
var three = document.querySelector(".three");
var man = document.querySelector("#man");
/!*mouseover鼠标划入*!/
three.addEventListener("mouseover",function () {
    man.style.display = "block";
});
three.addEventListener("mouseleave",function () {
    man.style.display = "none";
});
/!*mouseleave鼠标离开除本身*!/
man.addEventListener("mouseleave",function () {
    man.style.display = "none";
});
*/



 var s = new Vue({
    el: '.vignete',
    data: {
        links:[
            {
                img:'img/img-2.jpg',
                title:'手袋',
                copy:'互扣式G马衔扣的设计灵感源自一款典藏作品，结合品牌两款历史悠久的图案，以不同金属材质演绎现代风格',
                lsink:'更多'
            }
        ]
    }
});

var s = document.querySelector(".excl");
var rt_o = document.querySelector(".excu");
var excl_i = document.querySelector(".excl i");


s.addEventListener("click",function () {
    if(rt_o.style.height == "213px"){
        rt_o.style.height = "0";
        rt_o.style.opacity = "0";
        excl_i.style.transform = "rotate(0)";
    }else{
        rt_o.style.height = "213px";
        rt_o.style.opacity = "1";
        excl_i.style.transform = "rotate(45deg)";
    }
});


var ex_one = document.querySelector(".ex-one");
var one_ex = document.querySelector(".one-ex");
var ex_i = document.querySelector(".ex-one > i");
ex_one.addEventListener("click",function () {
    if(one_ex.style.height == "auto"){
        one_ex.style.height = "0";
        one_ex.style.opacity = "0";
        ex_i.style.transform = "rotate(0)";
        one_ex.style.display = "none";
    }else{
        one_ex.style.height = "auto";
        one_ex.style.opacity = "1";
        ex_i.style.transform = "rotate(45deg)";
        one_ex.style.display = "block"; 
    }
});


var ex_two = document.querySelector(".ex-two");
var two_ex = document.querySelector(".two-ex");
var ex_ii = document.querySelector(".ex-two > i");
ex_two.addEventListener("click",function () {
    if(two_ex.style.height == "auto"){
        two_ex.style.height = "0";
        two_ex.style.opacity = "0";
        ex_ii.style.transform = "rotate(0)";
        two_ex.style.display = "none";
    }else{
        two_ex.style.height = "auto";
        two_ex.style.opacity = "1";
        ex_ii.style.transform = "rotate(45deg)";
        two_ex.style.display = "block";
    }
});


var ex_three = document.querySelector(".ex-three");
var three_ex = document.querySelector(".three-ex");
var three_ii = document.querySelector(".ex-three > i");
ex_three.addEventListener("click",function () {
    if(three_ex.style.height == "auto"){
        three_ex.style.height = "0";
        three_ex.style.opacity = "0";
        three_ii.style.transform = "rotate(0)";
        three_ex.style.display ="none";
    }else{
        three_ex.style.height = "auto";
        three_ex.style.opacity = "1";
        three_ii.style.transform = "rotate(45deg)";
        three_ex.style.display = "block";
    }
});


var ex_four = document.querySelector(".ex-four");
var four_ex = document.querySelector(".four-ex");
var four_ii = document.querySelector(".ex-four > i");
ex_four.addEventListener("click",function () {
    if(four_ex.style.height == "auto"){
        four_ex.style.height = "0";
        four_ex.style.opacity = "0";
        four_ii.style.transform = "rotate(0)";
        four_ex.style.display = "none";
    }else{
        four_ex.style.height = "auto";
        four_ex.style.opacity = "1";
        four_ii.style.transform = "rotate(45deg)";
        four_ex.style.display = "block";
    }
});














